<div class="pageHeader">
<form id="pagerForm" method="post" action="<?php echo Yii::app()->request->requestUri?>">
	<input type="hidden" name="pageNum" value="1" />
</form>
</div>
<div class="pageContent">
<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="/<?php echo Yii::app()->controller->id?>/category_add" target="dialog" rel="obj<?php echo $name?>"><span>添加</span></a></li>
			<li><a class="edit" href="/<?php echo Yii::app()->controller->id?>/category_edit?id={id}" target="dialog" rel="obj<?php echo $name?>"><span>修改</span></a></li>
		</ul>
	</div>
		<table class="table" layouth="90" width="100%">
			<thead>
				<tr>
					<th width="100">ID</th>
					<th>标题</th>
					<th>内容数量</th>
				</tr>
			</thead>
			<tbody>
			    <?php foreach ($rows as $k => $row):?>
				<tr target="id" rel="<?php echo $row->id?>">
				<td><?php echo $row->id?></td>
				<td><?php echo $row->name?></td>
				<td><?php echo count($row->rels)?></td>
				</tr>
				<?php endforeach;?>
			</tbody>
		</table>

		<div class="panelBar">
			<div class="pages">
				<span>共<?php echo $pages->itemCount?>条</span>
			</div>
			
			<div class="pagination" targetType="navTab" totalCount="<?php echo $pages->itemCount?>" numPerPage="<?php echo $pages->pageSize?>" pageNumShown="10" currentPage="<?php echo $pages->currentPage + 1?>"></div>

		</div>
</div>